const replaceTelOrEmail = (value) =>{
	if(!value){
		return ''
	}
	let str = value
	// console.log(str);
	let regtel = /^(\d{3})\d{4}(\d{4})/
	let regemail = /(\d{3})\d*(\d{3})/
	if(str.length==11){
		str = str.toString().replace(regtel , '$1****$2')
	}else {
	  str = str.toString().replace( regemail , '$1*******$2')
	}
	// console.log(str);
	return str
}

export default replaceTelOrEmail
